package com.itheima.demo;

import java.io.*;
import java.net.Socket;

/**
 * @author Zhang_Han
 * @version 1.0
 * @date 2020/7/16 15:13
 */
public class Demo_TCP_001 {
    public static void main(String[] args) throws IOException {
        Socket sk = new Socket("127.0.0.1", 9999);
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(sk.getOutputStream()));
        bw.write("你好世界!");
        //关流 ;
        bw.close();
        sk.close();

    }
}
